import { _decorator, Component, director, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('fight')
export class fight extends Component {

    @property(Node)
    private pauseGameNode:Node;

    @property(Node)
    private pausePageNode:Node;

    @property(Node)
    private returnNode:Node;

    @property(Node)
    private continueNode:Node;

    start() {

        this.pauseGameNode.on(Node.EventType.TOUCH_END, () => {
            this.pausePageNode.active = true;
        });

        this.returnNode.on(Node.EventType.TOUCH_END, () => {
            director.loadScene("game");
        });

        this.continueNode.on(Node.EventType.TOUCH_END, () => {
            this.pausePageNode.active = false;
        });
    }

    update(deltaTime: number) {
        
    }
}

